Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/common/src/commonMain/kotlin/org/meshtastic/core/common/util/DateFormatter.kt 2d20cd8a4708e2ef66e98d5259f3a97ec93f240a (2d20cd8a) Text, 1.80 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.common.util

T8b949e/** Platform-agnostic Date formatter utility. */
Tff7b72expect Tff7b72object T56d364DateFormatter Tb4b4b4{
T8b949e/** Formats a timestamp into a relative "time ago" string. */
Tff7b72fun Td2a8ffformatRelativeTimeTb4b4b4(Te6edf3timestampMillisTb4b4b4: Tffa657LongTb4b4b4)Tb4b4b4: Tffa657String

T8b949e/** Formats a timestamp into a localized date and time string. */
Tff7b72fun Td2a8ffformatDateTimeTb4b4b4(Te6edf3timestampMillisTb4b4b4: Tffa657LongTb4b4b4)Tb4b4b4: Tffa657String

T8b949e/**
* Formats a timestamp into a short date or time string.
*
* Typically shows time if within the last 24 hours, otherwise the date.
*/
Tff7b72fun Td2a8ffformatShortDateTb4b4b4(Te6edf3timestampMillisTb4b4b4: Tffa657LongTb4b4b4)Tb4b4b4: Tffa657String

T8b949e/** Formats a timestamp into a localized time string (HH:mm). */
Tff7b72fun Td2a8ffformatTimeTb4b4b4(Te6edf3timestampMillisTb4b4b4: Tffa657LongTb4b4b4)Tb4b4b4: Tffa657String

T8b949e/** Formats a timestamp into a localized time string with seconds (HH:mm:ss). */
Tff7b72fun Td2a8ffformatTimeWithSecondsTb4b4b4(Te6edf3timestampMillisTb4b4b4: Tffa657LongTb4b4b4)Tb4b4b4: Tffa657String

T8b949e/** Formats a timestamp into a localized date string. */
Tff7b72fun Td2a8ffformatDateTb4b4b4(Te6edf3timestampMillisTb4b4b4: Tffa657LongTb4b4b4)Tb4b4b4: Tffa657String

T8b949e/** Formats a timestamp into a localized short date and medium time string. */
Tff7b72fun Td2a8ffformatDateTimeShortTb4b4b4(Te6edf3timestampMillisTb4b4b4: Tffa657LongTb4b4b4)Tb4b4b4: Tffa657String
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.06s